<template>
	<el-form :model="ruleForm" :rules="rules" label-width="100px">
		<el-form-item label="辅助信息" prop="placeholder">
			<el-input v-model="ruleForm.placeholder"></el-input>
		</el-form-item>
	</el-form>
</template>

<script lang="javascript">
	import { reactive, toRefs, watch } from 'vue';
	import { updatePropsShopDecoration } from './propsHooks';
	export default {
		props : {
			defaultProps : Object
		},
		setup (props) {
			let state = reactive({
				ruleForm : {
					placeholder : props.defaultProps.placeholder
				}
			});
			let updateProps = updatePropsShopDecoration();
			watch(state.ruleForm, () => {
				updateProps(state.ruleForm);
			});
			return {
				...toRefs(state)
			};
		}
	};
</script>

<style lang="scss" scoped></style>
